package org.flickphoto.unittests;

import javax.xml.parsers.ParserConfigurationException;

import org.flckphoto.FlickrManager;

import com.aetrion.flickr.Flickr;
import com.aetrion.flickr.REST;
import android.test.AndroidTestCase;

public class FlickrManagerTestCase extends AndroidTestCase {
	private FlickrManager testman;
	private static final String FLICKR_KEY = "4886cce7247cbe67b2da4ebff67e277b";
	private static final String FLICKR_SHARED_SECRET = "6bf4f74a185b5072";

	protected void setUp() throws Exception {
		super.setUp();
		testman = FlickrManager.getSingleton();
	}

	protected void tearDown() throws Exception {
		super.tearDown();
	}

	public void testGetSingleton() {
		FlickrManager testwoman = FlickrManager.getSingleton();
		assertTrue(testman==testwoman);
	}

	public void testGetFlickrInterface() throws Throwable {
		assertTrue(testman.getFlickrInterface() == new Flickr(FLICKR_KEY, FLICKR_SHARED_SECRET, new REST()));
	}


	public void testIsAuthenticated() {
		assertTrue(testman.isAuthenticated());
	}

	public void testSendemptyPicture() {
		assertFalse(testman.sendPicture(null));
	}

}
